﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Aspects.Custom
{
    class DebugWriter : System.IO.TextWriter
    {
        System.Windows.Forms.TextBox _output = null;

        public DebugWriter(System.Windows.Forms.TextBox output)
        {
            _output = output;
        }

        public override void Write(char value)
        {
            base.Write(value);
            _output.AppendText(value.ToString());
        }

        public override Encoding Encoding
        {
            get { return System.Text.Encoding.ASCII; }
        }
    }
}
